Collection NFT IDs
All the NFT IDs in an account's collection.
Parameters:
- address: The Flow Address of the account whose moment data needs to be read
Returns: [UInt64]
- A list of IDs
import NonFungibleToken from 0xNONFUNGIBLETOKENADDRESS
import AllDay from 0xALLDAYADDRESS
pub fun main(address: Address): [UInt64] {
let account = getAccount(address)
let collectionRef = account.getCapability(AllDay.CollectionPublicPath).borrow<&{NonFungibleToken.CollectionPublic}>()
?? panic("Could not borrow capability from public collection")
return collectionRef.getIDs()
}